package com.xgpro.mapper.rolemanage;

import com.xgpro.domain.rolemanage.entity.Token;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;

/**
 * @program: xgpro__dev
 * @description: 钉钉令牌DAO
 * @author: likai
 * @create: 2019-11-03 21:11
 **/
public interface TokenMapper extends Mapper<Token> {

    @Update("<script>" +
            "update t_token set date=#{date},token=#{token}" +
            "</script>")
    Integer update(@Param("date") Date date, @Param("token") String token);

    @Update("<script>" +
            "update t_token set date=#{date},token=#{token},ticket=#{ticket}" +
            "</script>")
    Integer updateticket(@Param("date") Date date, @Param("token") String token ,@Param("ticket") String ticket);
}
